{include file="pageheader.htm"}
<script type="text/javascript" src="../sapload/as/as.js"></script>
<form method="post" action="goods.php">
<div class="list-div" id="">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td class="label">点击：</td>
    <td><input type="text" value="{$goods.hits}" name="hits" /></td>
  </tr>
  <tr>
   	<td class="label">下载次数：</td>
    <td><input type="text" value="{$goods.down_total}" name="down_total" /></td>
  </tr>
  <tr>
    <td class="label">顶：</td>
    <td><input type="text" value="{$goods.good}" name="good" /></td>
  </tr>
  <tr>
    <td class="label">踩：</td>
    <td><input type="text" value="{$goods.bad}" name="bad" /></td>
  </tr>
  <tr>
    <td class="label">应用大小：</td>
    <td><input type="text" value="{$goods.size}" name="size" id="app_size" /></td>
  </tr>
  <tr>
    <td class="label">上传应用文件：</td>
    <td>
    <div id="sapload"></div><br />
    <span class="notice-span">超过20M的文件可能会上传失败。可使用其他方式上传。</span>
    </td>
  </tr>
  <tr>
    <td class="label">已上传的应用：</td>
    <td>
    {if $goods.app_url}<a href="{$goods.app_url}" target="_blank">点击下载</a>{/if}<br />
    <span id="newUrl"></span>
    </td>
  </tr><tr>
    <td class="label"></td>
    <td>
    <input type="hidden" name="app_url" id="app_url" value="{$goods.app_url}" />
    <input type="hidden" name="act" value="done_attribute" />
    <input type="hidden" name="goods_id" value="{$goods.goods_id}" />
    <input type="submit" value="保存" class="button" />
    <input type="reset" value="重置" class="button" />
    </td>
  </tr>
</table>
<script type="text/javascript">
	// <![CDATA[
	
	var so = new SWFObject("../sapload/as/sapload.swf?d="+Math.random(), "sapload", "450", "25", "9", "#ffffff");
	so.addVariable('types','*.jpg;*.rar;*.apk;*.zip');
	so.addVariable('args','myid=111;yid=222');
	so.addVariable('upUrl','http://www.thinkapk.com/backs/sapload/upload.php');
	so.addVariable('fileName','Filedata1');
	so.addVariable('maxNum','1');
	so.addVariable('maxSize','100');
	so.addVariable('etmsg','1');
	so.addVariable('ltmsg','1');
	so.write("sapload");
	
	function sapLoadMsg(t){
		//var pstr=$("#pw").html();
		if(t!=''){
			eval("var data="+t);
			document.getElementById('newUrl').innerHTML = "上传成功：<a href='"+data.url+"' target='_blank'>"+data.url+"</a>";
			document.getElementById('app_url').value = data.url;
			document.getElementById('app_size').value = data.size;
		}else{
			document.getElementById('newUrl').innerHTML = "上传失败，请重试！";
		}
		//var itml = pstr + '<a href="' + t + '" target="_blank">'+ t + '</a><br>';
		//$("#pw").html(itml);
	}
	// ]]>
</script>
</div>
</form>
{include file="pagefooter.htm"}